#pragma region Copyright
/// <copyright>
/// Copyright (c) 2007 Ilia Shramko.
/// Released under the terms of the GNU Lesser General Public License.
/// </copyright>
#pragma endregion

#pragma once

class Module : public CAtlDllModuleT<Module>
{
public:
	DECLARE_LIBID(__uuidof(OSHLibrary::__OSH))

	BOOL WINAPI DllMain(DWORD dwReason, LPVOID lpReserved) throw()
	{
		if(dwReason == DLL_PROCESS_ATTACH)
		{
			ATLTRACE(atlTraceGeneral, TraceLevel::Info, "\r\n");
			ATLTRACE_TS(atlTraceGeneral, TraceLevel::Info, "DLL_PROCESS_ATTACH\r\n");
		}
		else if(dwReason == DLL_PROCESS_DETACH)
		{
			ATLTRACE_TS(atlTraceGeneral, TraceLevel::Info, "DLL_PROCESS_DETACH\r\n");
		}
		return CAtlDllModuleT<Module>::DllMain(dwReason, lpReserved);
	}
};

extern Module _Module;